
Eos API
Application programming interface to EOS blockchain nodes. This is mostly for read-only API calls. If you decide you need to sign transactions, your better off using this API in the eosjs package.
Status: Beta
Requirement
Build and run eosd or direct requests to a public testnet or production node.
Usage
api = require('eosjs-api')
testnet = api.Testnet()
testnet.getInfo()
testnet.getInfo({}).then(result => console.log(result))
testnet.getBlock(1).then(result => console.log(result))
callback = (err, res) => {err ? console.error(err) : console.log(res)}
testnet.getInfo(callback)
testnet.getBlock(1, callback)
testnet.getBlock({block_num_or_id: 1}, callback)
testnet.getBlock({block_num_or_id: 1}).then(result => console.log(result))
Configuration
api = require('eosjs-api')
options = {
httpEndpoint: 'http://127.0.0.1:8888',
debug: false
}
testnet = api.Testnet(options)
API Documentation
API methods and documentation are generated from:
Environment
Node 6+ and browser (browserify, webpack, etc)
TODO
Automate code-coverage after a public testnet is available.